<style type="text/css">
	.simditor-body img {
		max-width: 100%;
	}

	/*头部样式*/
	.legend-tip {
		color: #f00;
		font-size: 14px;
		margin-left: 5px;
	}

	/*规格样式*/
	.skuChildren {
		margin-right: 10px;
		margin-top: 10px;
		padding: 0 5px;
		height: 24px;
		line-height: 24px;
		color: rgba(80, 80, 80, 1);
		border-radius: 2px;
		font-size: 12px;
		text-align: center;
		border: 1px solid rgba(231, 231, 231, 1);
		position: relative;
	}

	/*规格值*/
	.skuChildrenBox {
		display: flex;
		padding: 0 15px;
		flex-wrap: wrap;
	}

	/*规格小叉号*/
	.skuChildren-close {
		position: absolute;
		background: rgba(212, 48, 48, 1);
		color: #fff;
		border-radius: 50%;
		width: 12px;
		height: 12px;
		top: -6px;
		right: -6px;
		font-style: 12px;
		-webkit-transform: scale(0.8);
	}
</style>
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-goods_name" data-rule="required" class="form-control" name="row[goods_name]" type="text"
				value="{$row.goods_name}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">小标题:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-mix_title" data-rule="required" class="form-control" name="row[mix_title]" type="text"
				value="{$row.mix_title}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">商品标签:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-tag" autocomplete="off" data-source='{:json_encode($tags)}' data-field="title"
				class="form-control selectpage" name="row[tag]" type="text" value="{$row.tag}" data-pagination="false">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">{:__('封面图片')}:</label>
		<div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text"
					value="{$row.image}">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" id="plupload-image" class="btn btn-danger plupload"
							data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
							data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i>
							{:__('Upload')}</button></span>
					<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
							data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i
								class="fa fa-list"></i> {:__('Choose')}</button></span>
				</div>
				<span class="msg-box n-right" for="c-image"></span>
			</div>
			<ul class="row list-inline plupload-preview" id="p-image"></ul>
		</div>
	</div>
	<div class="form-group">
		<label for="c-avatar" class="control-label col-xs-12 col-sm-2">轮播图:</label>
		<div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<input id="c-avatar" data-rule="required" class="form-control" size="50" name="row[carousel_image]"
					type="text" value="{$row.carousel_image}">
				<div class="input-group-addon no-border no-padding">
					<span><button type="button" id="plupload-avatar" class="btn btn-danger plupload"
							data-input-id="c-avatar"
							data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,video/mp4,video/flv"
							data-multiple="true" data-preview-id="p-avatar"><i class="fa fa-upload"></i>
							上传</button></span>
					<span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose"
							data-input-id="c-avatar" data-mimetype="image/*" data-multiple="true"><i
								class="fa fa-list"></i> 选择</button></span>
				</div>
				<span class="msg-box n-right" for="c-avatar"></span>
			</div>
			<ul class="row list-inline plupload-preview" id="p-avatar"></ul>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">售价:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-price" data-rule="required" class="form-control" name="row[price]" type="text"
				value="{$row.price}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">划线价格:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-lineation_price" data-rule="required" class="form-control" name="row[lineation_price]"
				type="number" value="{$row.lineation_price}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">状态:</label>
		<div class="col-xs-12 col-sm-8">
			{:build_radios('row[is_enable]', ['1'=>'上架', '0'=>'下架'], $row['is_enable'])}
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="number"
				value="{$row.sort}">
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">虚拟销量:</label>
		<div class="col-xs-12 col-sm-8">
			<input id="c-virtually_sales_total" data-rule="required" class="form-control"
				name="row[virtually_sales_total]" type="number" value="{$row.virtually_sales_total}">
		</div>
	</div>
	<div class="widget-body no-padding">
		<div class="form-group">
			<legend></legend>
		</div>
		<div id='space'>
			{foreach name="attr" item="vo" key="k"}
			<div class="spaceItem">
				<div class="form-group skuMain">
					<label class="control-label col-xs-12 col-sm-2">规格:</label>
					<div class="col-xs-6 col-sm-6"><input type="text" data-rule="required" name="attr[]" maxlength="22"
							value="{$vo.attr_name}" placeholder="请输入规格名称" class="form-control"></div>
					{eq name="k" value="0" }
					<div class="col-xs-4 col-sm-2" style="text-align: right;"><span class="btn btn-primary"
							data="{$vo|count}">添加</span> </div>
					{else/}
					<div class="col-xs-4 col-sm-2" style="text-align: right;"><span
							class="btn btn-danger move">移除</span> </div>
					{/eq}
					<div class="col-xs-8 col-sm-8 col-xs-offset-2 col-sm-offset-2 skuChildrenBox"></div>
				</div>
				<div class="form-group skuMain">
					<label class="control-label col-xs-12 col-sm-2">售价:</label>
					<div class="col-xs-6 col-sm-6"><input type="number" data-rule="required" name="price[]"
							maxlength="22" value="{$vo.price}" placeholder="请输入售价" class="form-control"></div>
				</div>
				<div class="form-group skuMain">
					<label class="control-label col-xs-12 col-sm-2">库存:</label>
					<div class="col-xs-6 col-sm-6">
						<input type="number" data-rule="required" value="{$vo.stock}" name="stock[]" placeholder="请输入库存"
							class="form-control">
					</div>
				</div>
				<div class="form-group skuMain">
					<label for="c-attr{$k}" class="control-label col-xs-12 col-sm-2">规格图片:</label>
					<div class="col-xs-12 col-sm-8">
						<div class="input-group">
							<input id="c-attr{$k}" data-rule="required" class="form-control" size="50" name="images[]"
								type="text" value="{$vo.image}">
							<div class="input-group-addon no-border no-padding">
								<span><button type="button" id="plupload-attr{$k}" class="btn btn-danger plupload"
										data-input-id="c-attr{$k}"
										data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
										data-multiple="false" data-preview-id="p-attr{$k}"><i class="fa fa-upload"></i>
										{:__('Upload')}</button></span>
								<span><button type="button" id="fachoose-attr{$k}" class="btn btn-primary fachoose"
										data-input-id="c-attr{$k}" data-mimetype="image/*" data-multiple="false"><i
											class="fa fa-list"></i> {:__('Choose')}</button></span>
							</div>
							<span class="msg-box n-right" for="c-attr{$k}"></span>
						</div>
						<ul class="row list-inline plupload-preview" id="p-attr{$k}"></ul>
					</div>
				</div>
			</div>
			{/foreach}
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">小提示:</label>
		<div class="col-xs-12 col-sm-8">
			<textarea id="c-tips" data-rule="" class="form-control " rows="5" name="row[tips]"
				cols="50">{$row.tips|htmlentities}</textarea>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">售后保障:</label>
		<div class="col-xs-12 col-sm-8">
			<textarea id="c-guarantee" data-rule="" class="form-control editor" rows="5" name="row[guarantee]"
				cols="50">{$row.guarantee|htmlentities}</textarea>
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-xs-12 col-sm-2">详情:</label>
		<div class="col-xs-12 col-sm-8">
			<textarea id="c-describe" data-rule="" class="form-control editor" rows="5" name="row[introduction]"
				cols="50">{$row.introduction|htmlentities}</textarea>
		</div>
	</div>

	<div class="form-group layer-footer">
		<label class="control-label col-xs-12 col-sm-2"></label>
		<div class="col-xs-12 col-sm-8">
			<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
			<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
		</div>
	</div>
</form>